{* address book *}

<p><a class="faq" href="index.php?user_details=yes">{$smarty.const.MY_ACCOUNT_LINK}</a>


<form action='index.php?address_book=yes' method=post>
<TABLE BGCOLOR="#{$smarty.const.CONF_DARK_COLOR}" CELLSPACING="1" CELLPADDING="0" WIDTH=100%><TR><TD><table width=100% border=0 cellspacing="0" cellpadding="7">
	<tr>
		<td bgcolor="#{$smarty.const.CONF_LIGHT_COLOR}" class="myaccount_tab_bottom" width="25%">
			<a href='index.php?contact_info=yes'>
				{$smarty.const.STRING_CONTACT_INFORMATION_DOWN_CASE}
			</a>
		</td>
		<td rowspan="{if $smarty.const.CONF_AFFILIATE_PROGRAM_ENABLED}5{else}4{/if}" width="75%" bgcolor="white">
		<table width="100%" border="0" cellspacing="1" cellpadding="4" bgcolor={$smarty.const.CONF_MIDDLE_COLOR}>
			<tr bgcolor={$smarty.const.CONF_LIGHT_COLOR}>
				<td align=center width=1%>
					{$smarty.const.STRING_DEFAULT}
				</td>
				<td align=center>
					{$smarty.const.STRING_SHIPPING_ADDRESS}
				</td>
				<td>&nbsp;</td>
			</tr>

			{section name=i loop=$addresses}
			<tr bgcolor=white>
				<td>
					<input type=radio
					{if $defaultAddressID == $addresses[i].addressID}
						checked
					{/if}
					name='DefaultAddress' 
					value='{$addresses[i].addressID}'>
				</td>
				<td>
					<b>
						{$addresses[i].addressStr}
<!--
					{$smarty.const.STRING_RECEIVER}: {$addresses[i].first_name}, {$addresses[i].last_name}
					{$smarty.const.STRING_SHIPPING_ADDRESS}: {$addresses[i].address}, {$addresses[i].city}, 
						{$addresses[i].state}, {$addresses[i].zip}, {$addresses[i].country}
-->
					</b>
					
				</td>
				<td>
					<table>
						<tr>
							<td>
								<a href="index.php?address_editor={$addresses[i].addressID}">
								{$smarty.const.EDIT_BUTTON}
								</a>
							</td>
						</tr>
						<tr>
							<td>
								<a href="javascript:confirmDelete({$addresses[i].addressID},'{$smarty.const.QUESTION_DELETE_CONFIRMATION}','index.php?address_book=yes&delete=');">
									<img src="images/remove.jpg" border=0 alt="{$smarty.const.DELETE_BUTTON}">
								</a>
							</td>
						</tr>
					</table>
				</td>
			</tr>
			{sectionelse}
			<tr>
				<td colspan=3>
					{$smarty.const.STRING_EMPTY_LIST}
				</td>
			</tr>
			{/section}

			<tr bgcolor=white>
				<td>
					<input type=submit value='{$smarty.const.SAVE_BUTTON}' 
							name='save'>
				</td>
				<td>
					<a href='index.php?add_new_address=yes'>
						{$smarty.const.STRING_ADD_NEW_ADDRESS}
					</a>
				</td>
				<td>&nbsp;	
				</td>
			</tr>
		</table>

		</td>
	</tr>
	<tr>
		<td bgcolor="white" class="faq" align="center">
			<b>{$smarty.const.STRING_ADDRESS_BOOK}</b>
		</td>
	</tr>
	<tr>
		<td bgcolor="#{$smarty.const.CONF_LIGHT_COLOR}" class="myaccount_tab_top">
			<a href='index.php?order_history=yes'>
				{$smarty.const.STRING_ORDER_HISTORY}
			</a>
		</td>
	</tr>
	<tr>
		<td bgcolor="#{$smarty.const.CONF_LIGHT_COLOR}" class="myaccount_tab_top">
			<a href='index.php?visit_history=yes'>
				{$smarty.const.STRING_VISIT_HISTORY}
			</a>
		</td>
	</tr>
	{if $smarty.const.CONF_AFFILIATE_PROGRAM_ENABLED}
	<tr>
		<td bgcolor="#{$smarty.const.CONF_LIGHT_COLOR}" class="myaccount_tab_top">
			
			<a href='?affiliate=yes&sub=balance'>
				{$smarty.const.STRING_AFFILIATE_PROGRAM}
			</a>
		</td>
	</tr>
	{/if}
</table></TD></TR></TABLE>

</form>
<p>&nbsp;